package com.wy.android.mp.location;

import com.wy.android.mp.R;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;


/**
 * GPS定位界面
 * */

public class GpsLocationActivity extends ListActivity {
	
	private Button button;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.gpslocation);
		
		String[] menus = { "我的位置", "按坐标查询", "按地址查询","跟踪轨迹"};
		setListAdapter(new ArrayAdapter<String>(this,
				android.R.layout.simple_list_item_1, menus));
		getListView().setTextFilterEnabled(true);
		
		
		button=(Button) findViewById(R.id.returnButton4);
		button.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();
			}
		});
		
	}
	
	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		Intent intent=null;
		
		switch(position){
		
		case 0:
			intent=new Intent(GpsLocationActivity.this,MyPositionActivity.class);
			startActivity(intent);
			break;
		case 1:
			intent=new Intent(GpsLocationActivity.this,QueryPositionByLLActivity.class);
			startActivity(intent);
			break;
		case 2:
			
			break;
		case 3:
		
			break;
		}
		
	}
	
	
	
	

}
